package com.mp.approvalreq.entity;

import com.alibaba.fastjson.JSONObject;

import java.util.List;

public class TemplateComponent {
    public static final int SHOW_TYPE_DESCRIBE = 1;
    public static final int SHOW_TYPE_TIME = 2;
    public static final int SHOW_TYPE_COST = 3;
    /**
     * 新增字段,排序组件显示序号
     */
    private Integer sort;

    private Integer num;
    private Integer type;
    private String name;
    private Integer need;
    private String value;
    private Integer dbkey;
    private Integer requestId;
    private String requestTime;
    private Integer templateId;
    private String inputType;

    private Integer companyId;

    private List<GroupContent> groupContents;
    /**
     * 组件集id
     */
    private Integer groupId;
    /**
     * 汇总公式  默认为f(x) = num(a) + num(b) + group(i,j) + ……
     */
    private String summaryFormula;
    /**
     * 多选项的可选值
     */
    private List<String> multiChosen;
    /**
     * 列表展示位置: 1.原来的describeNum; 2.原来的timeNum; 3.原来的summaryNum
     */
    private Integer showType;
    /**
     * 组件集内展示组件的num
     */
    private Integer groupShowNum;

    private Integer templateAncestorId;

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getNeed() {
        return need;
    }

    public void setNeed(Integer need) {
        this.need = need;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Integer getDbkey() {
        return dbkey;
    }

    public void setDbkey(Integer dbkey) {
        this.dbkey = dbkey;
    }

    public Integer getRequestId() {
        return requestId;
    }

    public void setRequestId(Integer requestId) {
        this.requestId = requestId;
    }

    public String getRequestTime() {
        return requestTime;
    }

    public void setRequestTime(String requestTime) {
        this.requestTime = requestTime;
    }

    public Integer getTemplateId() {
        return templateId;
    }

    public void setTemplateId(Integer templateId) {
        this.templateId = templateId;
    }

    public String getInputType() {
        return inputType;
    }

    public void setInputType(String inputType) {
        this.inputType = inputType;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public List<GroupContent> getGroupContents() {
        return groupContents;
    }

    public void setGroupContents(List<GroupContent> groupContents) {
        this.groupContents = groupContents;
    }

    public Integer getGroupId() {
        return groupId;
    }

    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }

    public String getSummaryFormula() {
        return summaryFormula;
    }

    public void setSummaryFormula(String summaryFormula) {
        this.summaryFormula = summaryFormula;
    }

    public List<String> getMultiChosen() {
        return multiChosen;
    }

    public void setMultiChosen(List<String> multiChosen) {
        this.multiChosen = multiChosen;
    }

    public Integer getShowType() {
        return showType;
    }

    public void setShowType(Integer showType) {
        this.showType = showType;
    }

    public Integer getGroupShowNum() {
        return groupShowNum;
    }

    public void setGroupShowNum(Integer groupShowNum) {
        this.groupShowNum = groupShowNum;
    }

    public Integer getTemplateAncestorId() {
        return templateAncestorId;
    }

    public void setTemplateAncestorId(Integer templateAncestorId) {
        this.templateAncestorId = templateAncestorId;
    }

    @Override
    public String toString() {
        return JSONObject.toJSONString(this);
    }
}
